<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    {% load staticfiles %}
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="icon" href="/media/img/favicon.ico">
    <title>数据库审核系统</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/bootstrap/dist/css/bootstrap.min.css' %}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/font-awesome/css/font-awesome.min.css' %}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/bower_components/Ionicons/css/ionicons.min.css' %}">
    <!-- Theme style -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/dist/css/AdminLTE.min.css' %}">
    <!-- iCheck -->
    <link rel="stylesheet" href="{% static 'AdminLTE-2.4.5/plugins/iCheck/square/blue.css' %}">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>

<style>
.form-control{
    border-radius: 10px;
}
</style>

<body class="hold-transition login-page">
<div class="login-box">
    <div class="login-logo">
        <a href="#"><b>数据库审核系统</b></a>
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body">


        <form action="{% url 'p_login' %}" method="post">
        <p class="login-box-msg">请使用账号登陆</p>
            <div class="form-group has-feedback">
                <input type="text" name="username" class="form-control" placeholder="用户名">
                <i class="glyphicon glyphicon-user form-control-feedback"></i>
            </div>
            <div class="form-group has-feedback">
                <input type="password" name="password" class="form-control" placeholder="密码">
                <i class="glyphicon glyphicon-lock form-control-feedback"></i>
            </div>
            <div class="form-group row">
                <div class="col-sm-6">
                    <input type="text" class="form-control" placeholder="请输入右侧验证码" name="verifycode" id="verifycode">
                </div>
                <div class="col-sm-5">
                    <img class="check-code" src="{% url 'p_verify' %}" alt="验证码" onclick="ChangeCode(this);">
                </div>
            </div>
            <div class="form-group has-feedback">
                {% if msg %}
                    <p class="text-danger">{{ msg }}</p>
                {% endif %}
            </div>
            <div class="row">
                <!-- /.col -->
                <div class="col-xs-4 col-xs-offset-8">
                    <button type="submit" class="btn btn-primary btn-block btn-flat">登陆</button>
                </div>
                <!-- /.col -->
            </div>
            {% csrf_token %}
        </form>
    </div>
    <!-- /.login-box-body -->
</div>
<!-- /.login-box -->

<!-- jQuery 3 -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/jquery/dist/jquery.min.js' %}"></script>
<!-- Bootstrap 3.3.7 -->
<script src="{% static 'AdminLTE-2.4.5/bower_components/bootstrap/dist/js/bootstrap.min.js' %}"></script>
<!-- iCheck -->
<script src="{% static 'AdminLTE-2.4.5/plugins/iCheck/icheck.min.js' %}"></script>
<script>
    function ChangeCode(ths){
        ths.src = ths.src + '?';  //点击一下，局部重新get一次，重新生成验证
    }
</script>
</body>
</html>
